#include <stdio.h>

typedef struct complex_struct {
	double real, image;
	void *add;
} cmplx;

void add(cmplx *c1, cmplx *c2){
	c1->real += c2->real;
	c1->image += c2->image;
}

int main(int argc, char *argv[]) {
	cmplx c1 = {1, 3}, c2 = {6, 5};
	c1.add = &add;
	(* ((void *(*)(cmplx*, cmplx*))c1.add))(&c1, &c2);
	printf("c1 = %f + %fi\n", c1.real, c1.image);
	return 0;
}

